﻿using System;
using SSM.BusinessLayer.Enums;
using SSM.BusinessLayer.Monitors;

namespace SSM.BusinessLayer
{
	public class LogItem
	{
		#region Properties

		public AlertSeverity Severity { get; set; }
		public BaseMonitor MonitoredItem { get; set; }
        
		#endregion

		#region Constructors

		public LogItem()
		{
		}

		public LogItem(BaseMonitor newItem)
		{
			MonitoredItem = newItem;
		}

		#endregion

		#region ToString

		public override String ToString()
		{
			return MonitoredItem.Title + "|" + MonitoredItem.LastCheck.ToString("yyyyMMdd HH:mm:ss") + "|" + MonitoredItem.LastValue + "|" + Severity;
		}

		#endregion
	}
}